# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=mosca
pkgver=130.a7e725d
pkgrel=1
groups=('blackarch' 'blackarch-code-audit')
pkgdesc='Static analysis tool to find bugs like a grep unix command.'
arch=('x86_64' 'aarch64')
url='https://github.com/CoolerVoid/Mosca'
license=('GPL3')
depends=('pcre')
makedepends=('git')
source=("$pkgname::git+https://github.com/CoolerVoid/Mosca.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  make
}

package() {
  cd $pkgname

  install -Dm 755 $pkgname "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md TODO
  install -Dm 644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

